import { createRouter, createWebHistory, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: "/",
    redirect: '/home'
  },
  {
    path: "/home",
    component: () => import("../views/home/home.vue"),
  },
  {
    path: "/about",
    component: () => import("../views/about/about.vue"),
  },
  {
    path: "/chanpin",
    component: () => import("../views/chanpin/chanpin.vue"),
  },
  {
    path: "/jishu",
    component: () => import("../views/jishu/jishu.vue"),
  },
  {
    path: "/about",
    component: () => import("../views/about/about.vue"),
  },
  {
    path: "/shixun",
    component: () => import("../views/shixun/shixun.vue"),
    redirect: '/shixun/ceshi',
    children: [
      {
        path: "ceshi",
        component: () => import("../views/shixun/children/ceshi.vue"),
      },
      {
        path: "web",
        component: () => import("../views/shixun/children/web.vue"),
      },
      {
        path: "dashuju",
        component: () => import("../views/shixun/children/dashuju.vue"),
      },
      {
        path: "ui",
        component: () => import("../views/shixun/children/ui.vue"),
      },
      {
        path: "wlw",
        component: () => import("../views/shixun/children/wlw.vue"),
      },
    ]
  },
  {
    path: "/renli",
    component: () => import("../views/renli/renli.vue"),

  },
  {
    path: "/qiye",
    component: () => import("../views/qiye/qiye.vue"),
  },
  {
    path: "/demo",
    component: () => import("../views/demo/demo.vue"),
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;